<template>
    <div class="box">
        <input v-model="chatName" class="chatName"/>
        <input v-model="ifGroup" type="checkbox">
        <button class="add_chat" @click="addChat">ADD</button>
    </div>
</template>
<script>
export default {
    data(){
       return{
        ifGroup:false,
        chatName:''
       }
    },
    methods:{   
        addChat(){
            let param = {
                ifGroup:this.ifGroup,
                chatName:this.chatName
            }
            this.$emit("addChatHandler",param)
        }
    }
}
</script>
<style scoped>
.box{
    display: flex;
    justify-content: space-around;
    height: 5%;
}
</style>